///////////////////////////////////////////////////////////////////////////////
/// @author Aaron Wilhelm
/// @file   getopts.h
/// @brief  
///////////////////////////////////////////////////////////////////////////////
#ifndef GETOPTS_H
#define GETOPTS_H

#include <string>
#include <vector>

#define OptSize(a) sizeof(a)/sizeof(GetOpts::Option)

///////////////////////////////////////////////////////////////////////////////
/// @class GetOpts
/// @brief This is a class used to parse command line arguments
//////////////////////////////////////////////////////////////////////////////
class GetOpts
{
    public:
    /* Types */
        enum OptType
        {
            NONE,
            INT,
            FLOAT,
            DOUBLE,
            STRING,
        };

        struct Option
        {
            std::string shrt;
            std::string lng;
            OptType     type;
            bool        set;
            std::vector<std::string> value;
        };

        GetOpts();
        ~GetOpts();
        bool set_opts(Option *, unsigned int, unsigned int, char**);
        bool success();
        unsigned int flagless_cnt();
        std::string flagless(unsigned int);

    private:
        Option * m_opts;
        unsigned int m_opt_cnt;
        std::vector<std::string> m_no_flag;
};



#endif /* GETOPTS_H */
